package com.yilin.tms.core.remote;

import com.yilin.tms.core.application.ReturnData;
import com.yilin.tms.core.commons.annotation.UserTarget;
import com.yilin.tms.core.components.interceptor.ReqProviderInterceptor;
import com.yilin.tms.core.entity.capital.BankCard;
import com.yilin.tms.core.entity.capital.TradeRecord;
import com.yilin.tms.core.entity.data.statistics.TradeRecordStatistics;
import com.yilin.tms.core.entity.data.statistics.capital.CapitalStatistics;
import com.yilin.tms.core.entity.user.UserType;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 远程调用 资金服务
 *
 * @author zhangjinyuan
 * @date 2022/10/30
 */
@FeignClient(name = "capital-service-provider", configuration = ReqProviderInterceptor.class)
public interface ICapitalRemote {
    /**
     * 获取平台未生成或生产失败的数据
     */
    @PostMapping(value = "/capital/trade/getErrorTmsTradeRecord")
    ReturnData<List<TradeRecord>> getErrorTmsTradeRecord();

    @PostMapping(value = "/capital/trade/getTradeRecordByNo")
    ReturnData<TradeRecord> getTradeRecordByNo(@RequestParam("tradeNo")String tradeNo);
    /**
     * 批量获取
     */
    @PostMapping(value = "/capital/trade/getTradeRecordListByIds")
    ReturnData<List<TradeRecord>> getTradeRecordListByIds(@RequestParam(value = "tradeRecordIds") String tradeRecordIds);

    /**
     * 清除银行卡
     */
    @PostMapping(value = "/capital/assets/removeBankCardList")
    ReturnData<Object> removeBankCardList();

    //--------------------------------------------------------------------------------------------------------------------
    /**
     * 财务支付结算待处理统计
     */
    @PostMapping(value = "/capital/statistics/getTradeRecordStatistics")
    ReturnData<TradeRecordStatistics> getTradeRecordStatistics();


    @PostMapping(value = "/capital/assets/getDefaultBankCardList")
    ReturnData<List<BankCard>>  getDefaultBankCardList(@RequestParam(value = "organizeIds")String[] organizeIds);

    /**
     * 资金统计
     */
    @PostMapping(value = "/capital/statistics/getCapitalStatistics")
    ReturnData<CapitalStatistics> getCapitalStatistics();

}
